/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package control;
import java.util.ArrayList;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import memory.Chatroom;
import memory.Container;
import memory.Room;
import memory.User;
import memory.UserBanned;


/**
 *
 * @author Erdiansyah
 */
public class MyServlet implements ServletContextListener {
    public void contextInitialized(ServletContextEvent sce) {
        Container cont = new Container();
        cont.chatroomlist = new ArrayList<Chatroom>();
        cont.onlineuserlist = new ArrayList<User>();
        cont.roomlist = new ArrayList<Room>();
        cont.userbannedlist = new ArrayList<UserBanned>();
        cont.userfriendlist = new ArrayList<User>();
        sce.getServletContext().setAttribute("cont", cont);
    }

    public void contextDestroyed(ServletContextEvent sce) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
